package com.hopu.mapper;


import com.hopu.entity.Message;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MessageMapper {

    @Select("SELECT i.*,u.username,u.avatar_url,v.work_id,cm.content FROM interaction i,`user` u,video v,`comment` cm WHERE i.user_id=u.user_id AND i.work_id=v.work_id AND i.user_id=cm.user_id")
    List<Message> selectMessage();

}
